<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>订单详情</title>
	<link href="${pageContext.request.contextPath }/client/css/main.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css">
</head>
<body>
	<%@include file="./include/head.jsp" %>
	<%@include file="./include/menu_search.jsp" %>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

	<div class="container" style="padding: 25px 0;">
		<div class="row">
			<div class="col-md-2">
				订单编号：
			</div>
			<div class="col-md-10">
				<c:out value="${order.getId()}" />
			</div>
		</div>
		<div class="row">
			<div class="col-md-2">
				收件人：
			</div>
			<div class="col-md-4">
				<c:out value="${order.getReceiverName()}" />
			</div>
			<div class="col-md-2">
				联系电话：
			</div>
			<div class="col-md-4">
				<c:out value="${order.getReceiverPhone()}" />
			</div>
		</div>
		<div class="row">
			<div class="col-md-2">
				送货地址：
			</div>
			<div class="col-md-4">
				<c:out value="${order.getReceiverAddress()}" />
			</div>
			<div class="col-md-2">
				总价：
			</div>
			<div class="col-md-4">
				<c:out value="${order.getMoney()}" />
			</div>
		</div>
		<div class="row">
			<div class="col-md-2">
				下单时间：
			</div>
			<div class="col-md-4">
				<c:out value="${order.getOrdertime()}" />
			</div>
		</div>
		<div class="row">
			<div class="col-md-2">
				商品信息：
			</div>
			<div class="col-md-10">
				<table class="table table-bordered">
					<tr>
						<th>序号</th>
						<th>商品图片</th>
						<th>商品名称</th>
						<th>商品价格</th>
						<th>购买数量</th>
						<th>商品类别</th>
						<th>商品描述</th>
					</tr>
					<c:forEach items="${orderItems}" var="item" varStatus="status">
					<tr>
						<td><c:out value="${statusindex + 1}" /></td>
						<td>
							<img width="80" height="60" src="<c:out value="${item.p.getImgurl()}" />" />
						</td>
						<td><c:out value="${item.p.getName()}" /></td>
						<td><c:out value="${item.p.getPrice()}" /></td>
						<td><c:out value="${item.getBuyNum()}" /></td>
						<td><c:out value="${item.p.getCategory()}" /></td>
						<td><c:out value="${item.p.getDescription()}" /></td>
					</tr>
					</c:forEach>
				</table>
			</div>
		</div>
	</div>
	
	<%@include file="./include/foot.jsp" %>
</body>
</html>